package com.threeonemeeting.model;

import java.net.URLEncoder;

import com.threeonemeeting.Const;
import com.threeonemeeting.util.MiscUtil;

/**
 * 
 * @author Zhangzhongqing
 * @function 该类描述会议的基本信息
 */
public class MeetingInfo {

	public MeetingInfo(FullMeetingInfo fullInfo) {
		if (fullInfo == null)
			return;

		this.nId = fullInfo.nId;
		this.bFree = fullInfo.lPrice > 0 ? false : true;
		this.strAddress = fullInfo.strAddress;
		this.strTitle = fullInfo.strTitle;
		this.strType = fullInfo.strEventTypeName;
		this.strOrginalImageUrl = fullInfo.strLogoUrl;
		this.strOrginalImagePath = "";

		if (this.strOrginalImageUrl != null) {
			String strThumbUrl = Const.URL.BASE_THUMB_URL;
			strThumbUrl += URLEncoder.encode(this.strOrginalImageUrl);
			this.strThumbImageUrl = strThumbUrl;
		}

		this.strTime = MiscUtil.getBetweenTime(fullInfo.strBeingTime,
				fullInfo.strEndTime);
	}

	public int nId; // 会议的ID
	public String strTitle; // 会议的名称
	public String strTime; // 会议的时间
	public boolean bFree; // 是否是免费
	public String strType; // 会议的类型，研讨会还是其余的
	public String strAddress; // 会议的地址

	public String strOrginalImageUrl; // 初始的 URL
	public String strOrginalImagePath; // 初始的图片的本地保存路径
	public String strThumbImageUrl; // 会议的图片的URL
	public String strThumbImagePath; // 会议的本地保存路经
};
